<?php

/*

   Aiesec's Alumni System - to manage data about Aiesec's Alumni and
   optimize the knowledge exchange between old and new members.
   Copyright (C) 2009 Vinicius Stein Dani

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

*/

/*
  
   Author: Vinicius Stein Dani
   Contact: viniciussdani@gmail.com
   Today is: May 25, 2009
   Location at this present moment: Santa Maria - RS - Brasil
  
*/

SESSION_START();

?>

<?php

   $id = $id_usuario;

   $a = mysql_query("SELECT * FROM person_survey WHERE id_person = '$id'");
   while($b = mysql_fetch_array($a))
   {
      $id_person_survey        = $b['id_person_survey'];
      $newsletter              = $b['newsletter'];
      $emailGroup              = $b['emailGroup'];
      $doExchange              = $b['doExchange'];
      $tellExperience          = $b['tellExperience'];
      $beEvaluator             = $b['beEvaluator'];
      $beChair                 = $b['beChair'];
      $hostTrainees            = $b['hostTrainees'];
      $mentoring               = $b['mentoring'];
      $supervisoryGroup        = $b['supervisoryGroup'];
      $ebSelectionBoard        = $b['ebSelectionBoard'];
      $memberCoaching          = $b['memberCoaching'];
      $traineeReviewBoard      = $b['traineeReviewBoard'];
      $doProfessionalTrainment = $b['doProfessionalTrainment'];
      $alumniEventsParties     = $b['alumniEventsParties'];
      $aiesecEventsParties     = $b['aiesecEventsParties'];
      $openCompanyTN           = $b['openCompanyTN'];

      $_SESSION['person_newsletter']              = $newsletter;
      $_SESSION['person_emailGroup']              = $emailGroup;
      $_SESSION['person_doExchange']              = $doExchange;
      $_SESSION['person_tellExperience']          = $tellExperience;
      $_SESSION['person_beEvaluator']             = $beEvaluator;
      $_SESSION['person_beChair']                 = $beChair;
      $_SESSION['person_hostTrainees']            = $hostTrainees;
      $_SESSION['person_mentoring']               = $mentoring;
      $_SESSION['person_supervisoryGroup']        = $supervisoryGroup;
      $_SESSION['person_ebSelectionBoard']        = $ebSelectionBoard;
      $_SESSION['person_memberCoaching']          = $memberCoaching;
      $_SESSION['person_traineeReviewBoard']      = $traineeReviewBoard;
      $_SESSION['person_doProfessionalTrainment'] = $doProfessionalTrainment;
      $_SESSION['person_alumniEventsParties']     = $alumniEventsParties;
      $_SESSION['person_aiesecEventsParties']     = $aiesecEventsParties;
      $_SESSION['person_openCompanyTN']           = $openCompanyTN;

?>

  <form name="cadastro" id="cadastro" onSubmit="return valida();" action="<?php echo $_SERVER['PHPSELF']; ?>" method="post">
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td>
        
          <table border="0" cellpadding="0" cellspacing="5">
            <tr>
              <td colspan="2">
              
                <div style="font-size: 18px;">Quiz
                  <font style="font-size: 10px;">
                    <a href="index.php?menu=person_survey&id=<?php echo $id_usuario; ?>&id_detalhe=<?php echo $id_person_survey; ?>&acao=editar">(editar)</a> 
                    <a href="index.php?menu=person_survey&id=<?php echo $id_usuario; ?>&id_detalhe=<?php echo $id_person_survey; ?>&acao=excluir">(excluir)</a>
                  </font>                            
                </div>
              
              </td>
            </tr>
                                      
            <tr>
              <td width="260" align="left">
                Want to receive newsletter? <br />
                <b><?php if($_SESSION['person_newsletter'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_newsletter'] == "N") echo "No"; ?></b>
                </select>                
              </td>
              
              <td width="250" align="left">
                Want to join an e-mail group? <br />
                <b><?php if($_SESSION['person_emailGroup'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_emailGroup'] == "N") echo "No"; ?></b>
              </td>            
            </tr>

            <tr>
              <td align="left">
                Want to do exchange? <br />
                <b><?php if($_SESSION['person_doExchange'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_doExchange'] == "N") echo "No"; ?></b>
              </td>
              
              <td align="left">
                Want to share experience? <br />
                <b><?php if($_SESSION['person_tellExperience'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_tellExperience'] == "N") echo "No"; ?></b>
              </td>            
            </tr>

            <tr>
              <td align="left">
                Want to be an evaluator? <br />
                <b><?php if($_SESSION['person_beEvaluator'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_beEvaluator'] == "N") echo "No"; ?></b>
              </td>
              
              <td align="left">
                Want to a chair? <br />
                <b><?php if($_SESSION['person_beChair'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_beChair'] == "N") echo "No"; ?></b>
              </td>            
            </tr>

            <tr>
              <td align="left">
                Want to host trainees? <br />
                <b><?php if($_SESSION['person_hostTrainees'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_hostTrainees'] == "N") echo "No"; ?></b>
              </td>
              
              <td align="left">
                Want to be someone's mentor? <br />
                <b><?php if($_SESSION['person_mentoring'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_mentoring'] == "N") echo "No"; ?></b>
              </td>            
            </tr>

            <tr>
              <td align="left">
                Want to be in a supervisory group? <br />
                <b><?php if($_SESSION['person_supervisoryGroup'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_supervisoryGroup'] == "N") echo "No"; ?></b>
              </td>
              
              <td align="left">
                Want to be in EB Selection Board? <br />
                <b><?php if($_SESSION['person_ebSelectionBoard'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_ebSelectionBoard'] == "N") echo "No"; ?></b>
              </td>            
            </tr>

            <tr>
              <td align="left">
                Want to coach any member? <br />
                <b><?php if($_SESSION['person_memberCoaching'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_memberCoaching'] == "N") echo "No"; ?></b>
              </td>
              
              <td align="left">
                Want to participate on some trainee review board? <br />
                <b><?php if($_SESSION['person_traineeReviewBoard'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_traineeReviewBoard'] == "N") echo "No"; ?></b>
              </td>            
            </tr>

            <tr>
              <td align="left">
                Want to do some professional trainment? <br />
                <b><?php if($_SESSION['person_doProfessionalTrainment'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_doProfessionalTrainment'] == "N") echo "No"; ?></b>
              </td>
              
              <td align="left">
                Would like to launch any event/party on your own? <br />
                <b><?php if($_SESSION['person_alumniEventsParties'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_alumniEventsParties'] == "N") echo "No"; ?></b>
              </td>            
            </tr>

            <tr>
              <td align="left">
                Would like to participates to @ events/parties? <br />
                <b><?php if($_SESSION['person_aiesecEventsParties'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_aiesecEventsParties'] == "N") echo "No"; ?></b>
              </td>
              
              <td align="left">
                Would like to open any company TN? <br />
                <b><?php if($_SESSION['person_openCompanyTN'] == "Y") echo "Yes"; ?>
                <?php if($_SESSION['person_openCompanyTN'] == "N") echo "No"; ?></b>
              </td>            
            </tr>                                                                                            
          </table>
          
        </td>
      </tr>
    </table>
  </form>

<?php } ?>